package org.cocos2dx.javascript.Mob;

import android.util.Log;

public class PhoneUtils {
    public static final String PHONE_REGEX = "^1(3[0-9]|4[57]|5[0-35-9]|7[0135678]|8[0-9])\\d{8}$";

    public static final String PHONE_BLUR_REGEX = "(\\d{3})\\d{4}(\\d{4})";

    public static final String PHONE_BLUR_REPLACE_REGEX = "$1****$2";

    public static String phoneEncrypt(String strPhone){
        Log.e("phoneEncrypt", strPhone);
        return strPhone.replaceAll(PHONE_BLUR_REGEX, PHONE_BLUR_REPLACE_REGEX);
    }
}
